package cn.wolfcode.trip.api.controller;

import cn.wolfcode.trip.base.query.CatalogQueryObject;
import cn.wolfcode.trip.base.service.IStrategyCatalogService;
import cn.wolfcode.trip.base.service.IStrategyService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 攻略目录资源控制器
 */
@RestController
@RequestMapping("strategyCatalogs")
public class StrategyCatalogController {
    @Autowired
    private IStrategyCatalogService strategyCatalogService;

    @Autowired
    private IStrategyService strategyService;

    @GetMapping("{strategyId}")
    public PageInfo selectAllCatalogBystrategyId(CatalogQueryObject qo){
        qo.setPageSize(0);
        qo.setOrderBy("sc.sequence");
        return strategyCatalogService.query(qo);
    }



}
